//
//  UIImageView+loadImage.h
//  HoHo
//
//  Created by xiatiejun on 2021/8/1.
//  Copyright © 2021 xiatiejun. All rights reserved.
//


#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIImageView (loadImage)<CAAnimationDelegate>

extern void downloadImage(NSString *urlString, void (^completed)(UIImage * _Nullable image));

- (void)tj_setImageWithUrl:(NSString *)url;
- (void)tj_setImageWithUrl:(NSString *)url placeholderImage:(nullable UIImage *)placeholderImage;
- (void)tj_setImageWithURL:(NSURL *)URL;
- (void)tj_setImageWithURL:(NSURL *)URl placeholderImage:(nullable UIImage *)placeholderImage;
- (void)tj_setImageWithURL:(NSURL *)URl placeholderImage:(nullable UIImage *)placeholderImage progress:(void (^ __nullable)(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL))progress completed:(void (^ __nullable)(UIImage * _Nullable image, SDImageCacheType cacheType))completed;
- (void)tj_setImageWithURL:(NSURL *)URl placeholderImage:(nullable UIImage *)placeholderImage completed:(void (^ __nullable)(UIImage * _Nullable image))completed;

+ (UIImage *)imageFromCacheForURL:(NSURL *)URL;

@end

NS_ASSUME_NONNULL_END
